﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;


[RequireComponent(typeof(SpriteRenderer))]

public class GameTile : MonoBehaviour {

	public byte[,] map;

	protected SpriteRenderer spriteRenderer;

	// Use this for initialization
	void Start() {


		map = new byte[GameArea.CurrentArea.AreaWidth, GameArea.CurrentArea.AreaHeight];

		// generate the area
		for (int x = 0; x < GameArea.CurrentArea.AreaWidth; x++) {
			for (int y = 0; y < GameArea.CurrentArea.AreaHeight; y++) {
				map[x, y] = (byte)Random.Range(0, 255);
			}
		}

		/*
		for (int i = 0; i < 100; i++) {
			for (int j = 0; j < 100; j++) {
				MakeTile("floor_grass01", new Vector2(i - 50, j - 50));
			}
		}*/
	}

	// Update is called once per frame
	void Update() {
	
	}

	public virtual void CreateTile() {

		

	}
}
